﻿using EFModel;
using IServices;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Y2.Dao;
using Y2.Filters;

namespace Y2.Controllers
{
    [Obsolete]
    [LoginFilter]
    public class config_majorController : Controller
    {
        private readonly Iconfig_major he;

        public config_majorController(Iconfig_major he)
        {
            this.he = he;
        }

        public IActionResult config_major()
        {
            return View();
        }

        public async Task<IActionResult> Index8(int currentPage, int pageSize)
        {
            return Content(JsonConvert.SerializeObject(await he.Index8(currentPage, pageSize)));
        }

        public async Task<int> Inser5(string major_kind_id, string major_kind_name, string major_id, string major_name, string test_amount)
        {
            return await he.Inser5(major_kind_id, major_kind_name, major_id, major_name, test_amount);
        }

        public async Task<int> delt5(int mak_id)
        {
            return await he.delt5(mak_id);
        }

        public async Task<string> Zc()
        {
            return await he.Zc();
        }
    }
}
